#include "Renderer.h"
#include "LoadShaders.h"
#include "GL/glew.h"

Renderer::Renderer(){
}

Renderer::~Renderer(){
}

void Renderer::initialize(){
	glewInit();
	glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
	glClearDepth(1.0f);
	program = createProgram("VertexShader.vert", "FragmentShader.frag");
	groundLevel = -0.8f;
	ui = UI(groundLevel);
	ui.initialize();
}

void Renderer::render(){
	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
	glUseProgram(program);
	ui.render();
	glUseProgram(0);
}